#include "map_minedataset/MineDataSet.h"

namespace Mine
{
	CDrillFeature::~CDrillFeature()
	{
		for (auto itr : mpLithologyInfo)
		{
			delete itr;
			itr = nullptr;
		}
		mpLithologyInfo.clear();
	}

	DataManager::IFeature* CDrillDataSet::createFeature()
	{
		CDrillFeature* pFeature = new CDrillFeature();
		//static const uint32_t DRILL_LAYER_COUNT  = 10u;
		/*pFeature->mPos = osg::Vec3(rand() / float(RAND_MAX) * 350.f, rand() / float(RAND_MAX) * 350.f, rand() / float(RAND_MAX) * 5.f);
		pFeature->mDepths.resize(DRILL_LAYER_COUNT);
		for (uint32_t i = 0; i < DRILL_LAYER_COUNT; ++i)
		{		
			pFeature->mDepths[i] = rand() / float(RAND_MAX) * 20.f;
		}*/
		return pFeature;
	}

	DataManager::IFeature* CLaneDataSet::createFeature()
	{
		CLaneFeature* pFeature = new CLaneFeature();
		pFeature->setName("Lane");
		return pFeature;
	}

	DataManager::IFeature* CCoalDataSet::createFeature()
	{
		CCoalFeature* pFeature = new CCoalFeature();
		pFeature->setName("coal");
		return pFeature;
	}

	DataManager::IFeature* CStratumDataSet::createFeature()
	{
		CStratumFeature* pFeature = new CStratumFeature();
		return pFeature;
	}

}